home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Gigarom 1
/
Gigarom Macintosh Archives (Quantum Leap)(CDRM1080320)(1993).iso
/
FILES
/
APP
/
S-Z
/
Sys7 MiniGrinders.cpt
/
Lock It!
< prev
next >
Wrap
Text File
|
1991-03-01
|
633b
|
33 lines
program LockIt;
const
lockBit = 15;
var
fMessage: integer;
fCount: integer;
fLoop: integer;
fileInfo: AppFile;
fFndrInfo: FInfo
begin
CountAppFiles(fMessage, fCount);
if (fCount > 0) then
begin
for fLoop:= 1 to fCount do
begin
GetAppFiles(fLoop, fileInfo);
error:= GetFInfo(fileInfo.fName, fileInfo.vRefNum, fFndrInfo);
if (error <> noErr) then
begin
if (BTst(fFndrInfo.fdFlags, lockBit)) then
RstFLock(fileInfo.fName, fileInfo.vRefNum)
else
SetFLock(fileInfo.fName, fileInfo.vRefNum);
end;
ClrAppFiles(fLoop);
end;
end
else
SysBeep(1);
end.